import math

def calLGRL(curflow, expected, total):
    #print math.log(curflow) - math.log(expected)
    #print math.log(total - curflow) - math.log(total - expected)
    #return curflow * (math.log(curflow) - math.log(expected)) + (total - curflow) * (math.log(total - curflow) - math.log(total - expected))
    return curflow * (math.log(curflow) - math.log(expected))

total = 1.4623417E8
a = 15
b = 2309
t = 1.4623417E8
print '============================'
print a, b, calLGRL(a, b, t)
